package kr.haggenna.branch.controller;


import kr.haggenna.branch.dao.BranchDao;
import kr.haggenna.branch.domain.Branch;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class BranchController {
	
	@Autowired
	private BranchDao branchDao;
	
	@RequestMapping("/branch.do")
	public ModelAndView process(@RequestParam("branchNum")int branchNum){
		
		Branch branch = branchDao.selectBranch(branchNum);
		return new ModelAndView("branch","branch",branch);
		}
	
}
